package aplicativo.action;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import aplicativo.conversor.ConversorActivity;
import aplicativo.conversor.MedidasActivity;
import aplicativo.conversor.NumeracaoActivity;
import aplicativo.conversor.R;
import aplicativo.conversor.TemperaturaActivity;

public class ConversorAction{
	ConversorActivity activity;
	
	public ConversorAction(ConversorActivity activity){
		this.activity = activity;
	}

	public void clicarNumeracao(ImageView object) {
		object.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				Intent servico = new Intent(activity.getApplicationContext(), NumeracaoActivity.class);
				activity.startActivity(servico);
				
			}
		});
	}

	public void clicarMedida(ImageView object) {
		object.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				Intent servico = new Intent(activity.getApplicationContext(), MedidasActivity.class);
				activity.startActivity(servico);
				
			}
		});
	}

	public void clicarTemperatura(ImageView object) {
		object.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				Intent servico = new Intent(activity.getApplicationContext(), TemperaturaActivity.class);
				activity.startActivity(servico);
				
			}
		});
	}

	public void clicarSair(final ImageView object) {
			object.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				object.setImageResource(R.drawable.sair2);
			
				
		
			}
		});
		
	}

}
